<script type="text/javascript">
    function getCityData(city){

        if(city.length<3) return;
        $.getJSON('index.php?r=salespersonportal/ajax/getCityData&term='+city,function(data){
            $('#Locations_state').val(data.state);
            $('#Locations_zip').val(data.zipcode);
            $('#Locations_county').val(data.county);
        })
    }
    function searchCounty(){
        $.get('index.php?r=salespersonportal/ajax/lookupCounty&zipcode='+$('input#Locations_zip').val(),function(data){
            $('#Locations_county').val(data);
        })
    }
</script>
<div id="left-col">
    <?php $this->renderPartial('_side',array(
        'location'=>$model,
        'customer'=>$customer
    ));?>
    
   
    

</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">

            
            
            <div class="inside">
                <?php $this->renderPartial('_view',array(
                    'location'=>$model,
                ));?>
                <?php $this->renderPartial('_tab',array(
                    'model'=>$model,
                ));?>
                <br/>
                <?php $this->renderPartial('_form',array(
                    'model'=>$model,
                ));?>
                


                
            </div><!-- inside -->
        </div><!-- container -->
    </div><!-- wrap -->
    <?php $this->renderPartial('application.views.copyright'); ?>
</div> <!-- left-col -->